'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.home.index);
  router.get('/api/version/', controller.note.version);
  router.get('/api/notelist/', controller.note.getNotes);
  router.post('/api/notelist/', controller.note.setNotes);
  router.put('/api/notes/:index/', controller.note.setNote);
  router.post('/api/notes/', controller.note.addNote);
  router.delete('/api/notes/', controller.note.delNote);
};
